﻿using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace WareHose.Application
{
    public enum Status
    {
        [Description("成功")]
        Success = 200,
        [Description("失败")]
        Failed = 500
    }

    public class LoginData
    {
        /// <summary>
        /// tiken类型
        /// </summary>
        public string TokenType { get; set; }
        /// <summary>
        /// 返回token
        /// </summary>
        public string AccessToken { get; set; }
        /// <summary>
        /// 过期时间
        /// </summary>
        public DateTime expires { get; set; }
    }

    public class PermissionDto
    {
        public long userId { get; set; }
        public string[]? roles { get; set; }
        public string? username { get; set; }
        public string? nickname { get; set; }
        public string? avatar { get; set; }
        public string[]? perms { get; set; }
    }


    /// <summary>
    /// 返回结果
    /// </summary>
    public class ResultDto
    {
        public Status Code { get; set; }
        public string ?Message { get; set; }
    }

    /// <summary>
    /// 返回结果--泛型版本
    /// </summary>
    /// <typeparam name="TData"></typeparam>
    public class ResultDto<TData> : ResultDto
    {
        public TData ?Data { get; set; }
    }
    //显示分页版本

    public class ResultDtos<TData> : ResultDto
    {
        public TData? Data { get; set; }
        public int Listcount { get; set; }
    }


}